import {createApp} from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/styles/index.scss'
// import SvgIcon from '@/icons'
import 'element-plus/dist/index.css'
import '@/router/permission'


const app = createApp(App)


// 引入组件
import SvgIcon from '@/components/SvgIcon/index.vue'
// 全局组件挂载
app.component('SvgIcon', SvgIcon)


// 安装icons组件
// npm install @element-plus/icons-vue
import * as epi from '@element-plus/icons-vue'

for (const key in epi) {
    app.component(key, epi[key])
}

//npm i element-plus --save
import ep from 'element-plus'
import 'element-plus/dist/index.css'

app.use(ep)

// 安装icons组件
// npm install @element-plus/icons-vue
// import * as epi from '@element-plus/icons-vue'
//
// for (const [key, component] of Object.entries(epi)) {
//     app.component(key, component)
// }
//SvgIcon(app)
app.use(store)
app.use(router)

//npm i vue-i18n --save
import i18n from '@/i18n'

app.use(i18n)
app.mount('#app')
